#   字符串的替换
s = 'hello,Python,Python,Python'
print(s.replace('Python', 'Java'))
print(s.replace('Python', 'Java', 2))  # 第三个参数是最大替换次数
print(s)  # 说明替换后生成了新的字符串
#   字符串的合并
lst = ['Hello', 'Python', '123', 'sss']
print('*'.join(lst))
print(''.join(lst))
print('|'.join(lst))
t = ('Hello', 'Python', '123', 'sss')
print('*'.join(t))
print('*'.join('Python'))
dic = {'acc': 12, 'bcc': 23}
print('*'.join(dic))
print('HUAWEI'.join(dic))

